import request from '../util/request'

const baseUrl = process.env.NODE_ENV === 'production' ? '' : '/vehicleMap'

export function loadAreaApi(params) {
  return request({
    url:baseUrl+ "/lcarea",
    method: "get",
    params: params
  });
}

export function loadAreaListApi(params) {
  return request({
    url:baseUrl+ "/lcarea/list",
    method: "get",
    params: params
  });
}

export function addAreaApi(form) {
  return request({
    url:baseUrl+ "/lcarea",
    method: "post",
    data: form
  })
}

export function updateAreaApi(form) {
  return request({
    url:baseUrl+ "/lcarea",
    method: "put",
    data: form
  })
}

export function delAreaApi(row) {
  return request({
    url:baseUrl+ "/lcarea/selective",
    method: "delete",
    data: {
      id: row.id,
      position:row.position
    }
  })
}

export function addQaforLcAreaApi(ids, selectAreaId) {
  return request({
    url:baseUrl+ "/lcarea/addQaforLcArea?lcqaIds="+ids+"&areaId="+selectAreaId,
    method: "get"
  })
}

export function delQaforLcAreaApi(id, selectAreaId) {
  return request({
    url:baseUrl+ "/lcarea/deleteQaforLcArea?lcqaId="+id+"&areaId="+selectAreaId,
    method: "get",
  })
}
